import request from '@/utils/request'

/* 封装登录login函数 */
export const loginForm = (loginform) => {
  return request({
    url: '/api/login',
    method: 'post',
    data: loginform
  })
}

/* 封装注册reg函数 */
export const regForm = (loginform) => {
  return request({
    url: '/api/reg',
    method: 'post',
    data: loginform
  })
}

// 获取用户基本信息
export const getUserInfo = () => {
  return request({
    url: '/my/userinfo',
    method: 'get'
  })
}
